#ifndef _PROBE_
#define _PROBE_

#include <iostream>

#include "aerial\Game\GameObject\FlyObject\FlyObject.h"

#include "aerial\Game\GameObject\Equipment\VulcanEquip.h"

#include "hge\hge.h"
#include "hge\hgesprite.h"
#include "hge\hgevector.h"
#include "hge\hgeresource.h"

using namespace air;
using namespace std;

#define F_M_MOV		0x04

#define F_M_ROT		0x18
#define F_V_CROT	0x08
#define F_V_CCROT	0x10

#define F_M_VULCAN	0x3C
#define F_V_VULCAN	0x20	

#define F_M_MISSILE	0x40
#define F_M_TELE	0x80

#define TYPE_FIGHTER 0x2

/// @brief a type of aircraft
class Fighter: public FlyObject
{
public:
	Fighter(int id, const char* username, float x, float y, uchar side, float A = 0.f);
	~Fighter();

	void render();
	bool update(float dt);
	void processInput();

	/// @brief to specify the type of a FlyObject. return 1 for fighter
	inline virtual uchar GetFlightType() {	return TYPE_FIGHTER; }

	/**
	 * @brief move fighter according current status
	 *
	 * @param dt elapsed time
	 * @param flag 0 for static 1 for moving
	 */
	void move(float dt);

	/**
	 * @brief rotate fighter according current status
	 *
	 * @param dt elapsed time
	 */
	void turn(float dt);

	/// @breif handle the vulcan weapon
	void HandleVulcan(float dt);


private:
	// weapon list
	VulcanEquip* vulcanEquip;
	hgeSprite* spr;
	// each remote pull should be divided into 10 local pulls

	float lastArmor;
	int judge;

	static const float SpeedPowerGen;
	static const float MaxPower;
	static const float MaxArmor;

	static const float MaxShieldRadius;
	/// @biref Fighter's rad speed
	static const float RadiusPS;
	/// @brief Fighter's max speed Max Pixel Per Second
	static const float MPPS;
};


#endif
